Android article,What are the services in Android systems and when are they used?
نوشته شده توسط : dotnek

In applications intended for Android systems, the components of the applications are displayed to users when long and complex processes are performed. In this case, services are used. In other words, it can be said that when long-term processing needs to be done in the background and users can see them. It should be noted that services are one of the components that are most used in Android systems and are also used in more times when long and repetitive processing is done in the background of the Android system . What we mean by running in the background is that when the user even closes the application and opens another application, it runs again in the background. That is, when the application is closed, its activity is not interrupted, and it continues to operate behind the scenes or in the background. In short, we can say that services have no dependence on the life cycle of activities and can continue to operate without the need for them. Closing or opening the application and the desired program can not have any effect on the activity of services ; This means that whether the program or application is open or closed, the service will continue to operate.To better understand this issue, we will give you examples so that you can easily understand and understand them.Consider a situation where, for example, a user has opened a song in a music player. In this case, when the user wants to go to other activities or open another activity, the music that was playing will stop. But the user wants the music to continue playing and the user can safely go to other activities and work with them. In this case, the services will help and continue their activities in the background.In another example, consider the situation where the user wants to download a file, in which case the user must wait for the long download process to complete and then be able to go to other activities. This is tedious and tedious work, so we use the services so that we can continue long-term activities in the background and while continuing their activities in the background to other activities. When you use the Download Manager to download a file, you no longer must wait for the process to complete so that you can go to other activities, in which case you can activate other activities and use them at the same time as the Download Manager download process. By leaving this program, the download process will not stop, and users can easily continue their activities in other activities.

What are the different types of services in Android systems?

Services in Android systems are of two types:

1- Started Services

2- Bound Services

Started Services:

Started Services is related to the tasks that are defined for it, in that they only do the tasks that are intended for it and after that it does not do any other work. In other words, it is used to perform the intended activities and after completing that activity, it is no longer engaged in any other activity. It only does what it is supposed to do. It should be noted that this type of service is started by calling the startService and startForegroundService methods and its stopping is done by calling the stopService or stopSelf methods. In other words, we can say that in this type of service we can only use intent to start and stop services and we cannot have any other control and management on them. This service only allows us to start and stop, not to manage and control. 

Read more on:https://www.dotnek.com/Blog/Apps/what-are-the-services-in-android-systems-and

link:https://dotnek.mystrikingly.com/

Related link:DOTNEK BLOG





:: برچسب‌ها: dotnek , seo , site ,
:: بازدید از این مطلب : 176
|
امتیاز مطلب : 70
|
تعداد امتیازدهندگان : 14
|
مجموع امتیاز : 14
تاریخ انتشار : سه شنبه 19 مرداد 1400 | نظرات ()
مطالب مرتبط با این پست
لیست
می توانید دیدگاه خود را بنویسید


نام
آدرس ایمیل
وب سایت/بلاگ
:) :( ;) :D
;)) :X :? :P
:* =(( :O };-
:B /:) =DD :S
-) :-(( :-| :-))
نظر خصوصی

 کد را وارد نمایید:

آپلود عکس دلخواه: